package com.geek.javase.Game;

/**
 * @author chenshupeng
 * @date 2025/9/3
 * @desc TODO
 **/

public abstract class Role {
    private String name;
    private String kind;//种类
    private int blood;//血量
    private int power;//攻击力
    private  int defence;//防御力
    private int level;

    public Role() {
    }

    public Role(String name, String kind, int blood, int power, int defence, int level) {
        this.name = name;
        this.kind = kind;
        this.blood = blood;
        this.power = power;
        this.defence = defence;
        this.level = level;
    }

    public abstract void attack(Role a);

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return kind
     */
    public String getKind() {
        return kind;
    }

    /**
     * 设置
     * @param kind
     */
    public void setKind(String kind) {
        this.kind = kind;
    }

    /**
     * 获取
     * @return blood
     */
    public int getBlood() {
        return blood;
    }

    /**
     * 设置
     * @param blood
     */
    public void setBlood(int blood) {
        this.blood = blood;
    }

    /**
     * 获取
     * @return power
     */
    public int getPower() {
        return power;
    }

    /**
     * 设置
     * @param power
     */
    public void setPower(int power) {
        this.power = power;
    }

    /**
     * 获取
     * @return defence
     */
    public int getDefence() {
        return defence;
    }

    /**
     * 设置
     * @param defence
     */
    public void setDefence(int defence) {
        this.defence = defence;
    }

    /**
     * 获取
     * @return level
     */
    public int getLevel() {
        return level;
    }

    /**
     * 设置
     * @param level
     */
    public void setLevel(int level) {
        this.level = level;
    }

    public String toString() {
        return "Role{name = " + name + ", kind = " + kind + ", blood = " + blood + ", power = " + power + ", defence = " + defence + ", level = " + level + "}";
    }
}
